#include "ProjectSerializer.h"
#include <SEngine/Project/Project.h>
#include <yaml-cpp/yaml.h>
#include <SESerializeYAML/SceneSerializer.h>
#include <SESerializeYAML/Util.h>

namespace SEngine
{
    std::string Serializer<Project>::Serialize(Project & object) 
    {
        YAML::Node node;
        node["Scene"] = YAML::Load(object.m_scene->Serialize());
        return YAMLNodeToString(node);
    }

    void Serializer<Project>::Deserialize(const std::string& str, Project & object)
    {
        YAML::Node node = YAML::Load(str);
        object.m_scene->Deserialize(YAMLNodeToString(node["Scene"]));
    }
}
